package org.iabako.client.config.validation;

import com.google.gwt.core.client.GWT;
import com.google.gwt.validation.client.AbstractGwtValidatorFactory;
import com.google.gwt.validation.client.GwtValidation;
import com.google.gwt.validation.client.impl.AbstractGwtValidator;
import org.iabako.shared.entity.business.*;
import org.iabako.shared.entity.user.Enterprise;

import javax.validation.Validator;

/**
 * TODO javadoc
 * Date: 24/11/13
 * Time: 18:22
 */
public class IabakoValidatorFactory extends AbstractGwtValidatorFactory {

    @GwtValidation(value = {Address.class, Enterprise.class, Client.class, Product.class, Service.class, Sale.class, InvoiceRecipient.class,
            Payment.class, Installment.class, Expense.class, PaymentRequestConfig.class, ClientConversation.class})
    public interface GwtValidator extends Validator {
    }

    @Override
    public AbstractGwtValidator createValidator() {
        return GWT.create(GwtValidator.class);
    }
}
